import React, { PureComponent } from 'react';
import { Switch, Redirect } from 'react-router';
import { BrowserRouter as Router, Route } from 'react-router-dom'
import Homepage from './page/Homepage/Homepage.js'
import Shequ from './page/Shequ/Shequ.js'
import Zhuce from './page/Zhuce/Zhuce.js'
import Admin from './page/Admin/Admin.js'
import UserInfo from './page/UserInfo/UserInfo.js'
import Psytest from './page/Psytest/Psytest.js'
import Login from './page/Login/Login.js'
import logo from './logo.svg';
import './App.css';

class App extends PureComponent {
  render() {
    return (
      <Router>
        <Switch>
          <Route path='/login' component={Login} />
          <Route path='/zhuce' component={Zhuce} />
          <Route path='/homepage' component={Homepage} />
          <Route path='/shequ' component={Shequ} />
          <Route path='/userinfo' component={UserInfo} />
          <Route path='/psytest' component={Psytest} />
          <Route path='/admin' component={Admin} />
          <Redirect from='/*' to='/homepage' />
        </Switch>
      </Router>
    );
  }
}

export default App;
